<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let obj = {};
    obj.name = '小明';
    obj.age = 25;
    obj.init = function () {
      alert(`我叫${this.name},我今年${this.age + ''}岁了`);
    };
    
    obj.init();
  </script>
</body>

</html>